//
//  main.m
//  多维数组名作为函数参数
//
//  Created by apple on 15/8/2.
//  Copyright (c) 2015年 戴维营. All rights reserved.
//

#import <Foundation/Foundation.h>

int max(int str[][4])
{
    int i,j,max;
    max = str[0][0];
    
    for (i = 0;i < 3 ; i++)
    {
        for (j = 0; j < 4; j++)
        {
            if (str[i][j] > max)
            {
                max = str[i][j];
            }
            
        }
    }
    return max;
}

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        
        //int n;
        int a[3][4] = {{1,3,5,7},{2,4,6,8},{12,32,43,54}};
       // n = max(a[3][4]);
        
      //  NSLog(@"%d",n);
        NSLog(@"%d",max(a));
    }
    return 0;
}
